package com.yingside.exception.student;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class Student {
    public void study() throws FileNotFoundException,IOException{
        try {

            FileInputStream fis = new FileInputStream("");
            fis.read();
        } catch (FileNotFoundException e) {
            System.out.println("文件不存在");
            throw e;
        } catch(IOException e){
            System.out.println("文件读取异常");
            throw e;
        }
    }


    public int test(){
        int a = 1;
        try {
            a = 2;
            FileInputStream fis = new FileInputStream("");
            return a;
        } catch (FileNotFoundException e) {
            a = 4;
            return a;
        } finally {
            a = 5;
            System.out.println("a = " + a);
        }
    }
}
